#!/bin/bash
FILE="./flypy.dict"
if [ -e $FILE ];then
        echo "Remove existing file $FILE"
        rm $FILE
else
    echo "$FILE is not existing. Skip..."
fi
echo "Generate dict file..."
libime_tabledict flypy.txt flypy.dict
echo "Coping conf file..."
sudo cp flypy_fcitx5.conf /usr/share/fcitx5/inputmethod/flypy.conf
echo "Moving dict file..."
sudo mv flypy.dict /usr/share/libime/flypy.dict
fcitx5-configtool
echo "done."